package com.open.capacity.reimburse.dao;

import com.open.capacity.reimburse.entity.SysEmail;
import com.open.capacity.reimburse.entity.SysEmailRecipient;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;
import java.util.Map;

/**
 * @author
 * @email
 * @date 2021-06-25 15:47:02
 */
@Mapper
public interface SysEmailRecipientDao {

    int save(SysEmailRecipient sysEmailRecipient);

    int update(SysEmailRecipient sysEmailRecipient);

    int updateIsRead(@Param("emailId") String emailId, @Param("recipientId") String recipientId);

    int updateStatus(@Param("emailId") String emailId, @Param("recipientId") String recipientId, @Param("status") Integer status);

    int delete(String id);

    int deleteByUserid(@Param("emailId") String emailId, @Param("recipientId") String recipientId);

    int deleteByEmailId(String emailId);

    SysEmailRecipient findById(String id);

    List<SysEmailRecipient> findByEmailId(String emailId);

    List<SysEmail> findAll(Map<String, Object> params);

}
